package com.wish.group05.system.api;

import com.wish.group05.common.core.constant.ServiceNameConstants;
import com.wish.group05.common.core.web.domain.AjaxResult;
import com.wish.group05.system.api.factory.RemoteSmsFallbackFactory;
import com.wish.group05.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 发送短信服务
 * @author wish
 */
@FeignClient(contextId = "remoteSmsService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteSmsFallbackFactory.class)
public interface RemoteSmsService {

    /**
     * 通过手机号发送短信
     * @param telephone
     * @return
     */
    @GetMapping("/sms/send")
    public AjaxResult sendCode(@RequestParam("token") String token,@RequestParam("ip") String ip,@RequestParam("telephone") String telephone);
}
